/ Eagles Nest BBS 8
/ Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / AdaV401#3 / AdaV3 / test / SCAN_COM.ADA ![]() | < prev | next > |
MacBinary | 1988-03-19 | 1.9 KB | [TEXT/????] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, inited, Sat Mar 19 03:04:48 1988, modified Sat Mar 19 03:04:48 1988, creator '????', type ASCII, 1306 bytes "SCAN_COM.ADA" , at 0x59a 382 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [????] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 53 43 41 4e 5f 43 | 4f 4d 2e 41 44 41 00 00 |..SCAN_C|OM.ADA..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 01 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 05 1a 00 | 00 01 7e 9e 67 dc 20 9e |........|..~.g. .|
|00000060| 67 dc 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |g. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 77 c3 00 00 |........|....w...|
|00000080| 2d 2d 20 54 68 69 73 20 | 65 78 61 6d 70 6c 65 20 |-- This |example |
|00000090| 61 63 63 65 70 74 73 20 | 63 6f 6d 6d 61 6e 64 20 |accepts |command |
|000000a0| 6c 69 6e 65 73 20 6f 66 | 20 74 68 65 20 66 6f 72 |lines of| the for|
|000000b0| 6d 3a 0d 2d 2d 0d 2d 2d | 20 20 20 20 20 20 70 72 |m:.--.--| pr|
|000000c0| 6f 67 20 5b 2d 61 5d 20 | 5b 2d 62 5d 20 5b 61 72 |og [-a] |[-b] [ar|
|000000d0| 67 5d 20 2e 2e 2e 0d 2d | 2d 0d 2d 2d 20 77 68 65 |g] ....-|-.-- whe|
|000000e0| 72 65 20 22 70 72 6f 67 | 22 20 69 73 20 74 68 65 |re "prog|" is the|
|000000f0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 70 72 6f | name of| the pro|
|00000100| 67 72 61 6d 2c 20 22 2d | 61 22 20 61 6e 64 0d 2d |gram, "-|a" and.-|
|00000110| 2d 20 22 2d 62 22 20 61 | 72 65 20 6c 65 67 61 6c |- "-b" a|re legal|
|00000120| 20 6f 70 74 69 6f 6e 73 | 2c 20 61 6e 64 20 22 61 | options|, and "a|
|00000130| 72 67 22 20 69 73 20 73 | 6f 6d 65 20 6f 70 74 69 |rg" is s|ome opti|
|00000140| 6f 6e 61 6c 0d 2d 2d 20 | 61 72 67 75 6d 65 6e 74 |onal.-- |argument|
|00000150| 2e 0d 2d 2d 0d 77 69 74 | 68 20 74 65 78 74 5f 68 |..--.wit|h text_h|
|00000160| 61 6e 64 6c 65 72 3b 20 | 20 20 20 20 20 75 73 65 |andler; | use|
|00000170| 20 74 65 78 74 5f 68 61 | 6e 64 6c 65 72 3b 0d 77 | text_ha|ndler;.w|
|00000180| 69 74 68 20 74 65 78 74 | 5f 69 6f 3b 20 20 20 20 |ith text|_io; |
|00000190| 20 20 20 20 20 20 20 75 | 73 65 20 74 65 78 74 5f | u|se text_|
|000001a0| 69 6f 3b 0d 77 69 74 68 | 20 61 72 67 3b 0d 70 72 |io;.with| arg;.pr|
|000001b0| 6f 63 65 64 75 72 65 20 | 73 63 61 6e 5f 63 6f 6d |ocedure |scan_com|
|000001c0| 20 69 73 0d 20 20 74 68 | 69 73 3a 20 74 65 78 74 | is. th|is: text|
|000001d0| 28 31 32 37 29 3b 0d 20 | 20 75 6e 72 65 63 6f 67 |(127);. | unrecog|
|000001e0| 6e 69 7a 65 64 5f 6f 70 | 74 69 6f 6e 3a 20 65 78 |nized_op|tion: ex|
|000001f0| 63 65 70 74 69 6f 6e 3b | 0d 20 20 69 6c 6c 65 67 |ception;|. illeg|
|00000200| 61 6c 5f 61 72 67 75 6d | 65 6e 74 3a 20 65 78 63 |al_argum|ent: exc|
|00000210| 65 70 74 69 6f 6e 3b 0d | 62 65 67 69 6e 0d 20 20 |eption;.|begin. |
|00000220| 66 6f 72 20 69 20 69 6e | 20 32 2e 2e 61 72 67 2e |for i in| 2..arg.|
|00000230| 63 6f 75 6e 74 20 6c 6f | 6f 70 0d 0d 20 20 20 20 |count lo|op.. |
|00000240| 73 65 74 28 74 68 69 73 | 2c 20 61 72 67 2e 64 61 |set(this|, arg.da|
|00000250| 74 61 28 69 29 29 3b 0d | 20 20 20 20 20 20 2d 2d |ta(i));.| --|
|00000260| 20 63 6f 6e 76 65 72 74 | 20 73 74 72 69 6e 67 20 | convert| string |
|00000270| 61 72 67 75 6d 65 6e 74 | 20 74 6f 20 74 65 78 74 |argument| to text|
|00000280| 20 6f 62 6a 65 63 74 2e | 0d 0d 20 20 20 20 69 66 | object.|.. if|
|00000290| 20 6e 6f 74 20 65 6d 70 | 74 79 28 74 68 69 73 29 | not emp|ty(this)|
|000002a0| 20 74 68 65 6e 0d 20 20 | 20 20 20 20 69 66 20 76 | then. | if v|
|000002b0| 61 6c 75 65 28 74 68 69 | 73 29 28 31 29 20 3d 20 |alue(thi|s)(1) = |
|000002c0| 27 2d 27 20 74 68 65 6e | 0d 09 69 66 20 6c 65 6e |'-' then|..if len|
|000002d0| 67 74 68 28 74 68 69 73 | 29 20 3c 20 32 20 74 68 |gth(this|) < 2 th|
|000002e0| 65 6e 0d 09 20 20 72 61 | 69 73 65 20 69 6c 6c 65 |en.. ra|ise ille|
|000002f0| 67 61 6c 5f 61 72 67 75 | 6d 65 6e 74 3b 0d 09 20 |gal_argu|ment;.. |
|00000300| 20 20 20 2d 2d 20 61 72 | 67 75 6d 65 6e 74 20 77 | -- ar|gument w|
|00000310| 61 73 20 6a 75 73 74 20 | 27 2d 27 20 61 6c 6f 6e |as just |'-' alon|
|00000320| 65 2e 0d 09 65 6e 64 20 | 69 66 3b 0d 09 63 61 73 |e...end |if;..cas|
|00000330| 65 20 76 61 6c 75 65 28 | 74 68 69 73 29 28 32 29 |e value(|this)(2)|
|00000340| 20 69 73 0d 09 20 20 77 | 68 65 6e 20 27 61 27 20 | is.. w|hen 'a' |
|00000350| 3d 3e 0d 09 20 20 20 20 | 70 75 74 5f 6c 69 6e 65 |=>.. |put_line|
|00000360| 28 22 2d 61 20 72 65 63 | 6f 67 6e 69 7a 65 64 22 |("-a rec|ognized"|
|00000370| 29 3b 0d 09 20 20 77 68 | 65 6e 20 27 62 27 20 3d |);.. wh|en 'b' =|
|00000380| 3e 0d 09 20 20 20 20 70 | 75 74 5f 6c 69 6e 65 28 |>.. p|ut_line(|
|00000390| 22 2d 62 20 72 65 63 6f | 67 6e 69 7a 65 64 22 29 |"-b reco|gnized")|
|000003a0| 3b 0d 09 20 20 77 68 65 | 6e 20 6f 74 68 65 72 73 |;.. whe|n others|
|000003b0| 20 3d 3e 0d 09 20 20 20 | 20 72 61 69 73 65 20 75 | =>.. | raise u|
|000003c0| 6e 72 65 63 6f 67 6e 69 | 7a 65 64 5f 6f 70 74 69 |nrecogni|zed_opti|
|000003d0| 6f 6e 3b 0d 09 20 20 20 | 20 20 20 2d 2d 20 61 72 |on;.. | -- ar|
|000003e0| 67 75 6d 65 6e 74 20 77 | 61 73 6e 27 74 20 22 2d |gument w|asn't "-|
|000003f0| 61 22 20 6f 72 20 22 2d | 62 22 2e 0d 09 65 6e 64 |a" or "-|b"...end|
|00000400| 20 63 61 73 65 3b 0d 20 | 20 20 20 20 20 65 6c 73 | case;. | els|
|00000410| 65 0d 09 70 75 74 5f 6c | 69 6e 65 28 22 61 72 67 |e..put_l|ine("arg|
|00000420| 75 6d 65 6e 74 20 22 22 | 22 20 26 20 76 61 6c 75 |ument ""|" & valu|
|00000430| 65 28 74 68 69 73 29 20 | 26 0d 09 09 20 20 20 20 |e(this) |&... |
|00000440| 22 22 22 20 72 65 63 6f | 67 6e 69 7a 65 64 22 29 |""" reco|gnized")|
|00000450| 3b 0d 09 20 20 2d 2d 20 | 61 72 67 75 6d 65 6e 74 |;.. -- |argument|
|00000460| 20 64 69 64 6e 27 74 20 | 73 74 61 72 74 20 77 69 | didn't |start wi|
|00000470| 74 68 20 27 2d 27 2e 0d | 20 20 20 20 20 20 65 6e |th '-'..| en|
|00000480| 64 20 69 66 3b 0d 20 20 | 20 20 65 6c 73 65 0d 20 |d if;. | else. |
|00000490| 20 20 20 20 20 72 61 69 | 73 65 20 69 6c 6c 65 67 | rai|se illeg|
|000004a0| 61 6c 5f 61 72 67 75 6d | 65 6e 74 3b 0d 09 2d 2d |al_argum|ent;..--|
|000004b0| 20 61 72 67 75 6d 65 6e | 74 20 77 61 73 20 65 6d | argumen|t was em|
|000004c0| 70 74 79 20 73 6f 6d 65 | 68 6f 77 2e 0d 20 20 20 |pty some|how.. |
|000004d0| 20 65 6e 64 20 69 66 3b | 0d 0d 20 20 65 6e 64 20 | end if;|.. end |
|000004e0| 6c 6f 6f 70 3b 0d 0d 65 | 78 63 65 70 74 69 6f 6e |loop;..e|xception|
|000004f0| 0d 20 20 77 68 65 6e 20 | 69 6c 6c 65 67 61 6c 5f |. when |illegal_|
|00000500| 61 72 67 75 6d 65 6e 74 | 20 3d 3e 0d 20 20 20 20 |argument| =>. |
|00000510| 70 75 74 5f 6c 69 6e 65 | 28 22 49 6c 6c 65 67 61 |put_line|("Illega|
|00000520| 6c 20 61 72 67 75 6d 65 | 6e 74 22 29 3b 0d 0d 20 |l argume|nt");.. |
|00000530| 20 77 68 65 6e 20 75 6e | 72 65 63 6f 67 6e 69 7a | when un|recogniz|
|00000540| 65 64 5f 6f 70 74 69 6f | 6e 20 3d 3e 0d 20 20 20 |ed_optio|n =>. |
|00000550| 20 70 75 74 5f 6c 69 6e | 65 28 22 55 6e 72 65 63 | put_lin|e("Unrec|
|00000560| 6f 67 6e 69 7a 65 64 20 | 6f 70 74 69 6f 6e 3a 20 |ognized |option: |
|00000570| 27 22 20 26 0d 09 09 76 | 61 6c 75 65 28 74 68 69 |'" &...v|alue(thi|
|00000580| 73 29 20 26 20 27 27 27 | 29 3b 0d 0d 65 6e 64 20 |s) & '''|);..end |
|00000590| 73 63 61 6e 5f 63 6f 6d | 3b 0d 00 00 00 00 00 00 |scan_com|;.......|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000610| 20 20 20 20 20 72 61 69 | 73 65 20 69 6c 6c 65 67 | rai|se illeg|
|00000620| 61 6c 5f 61 72 67 75 6d | 65 6e 74 3b 0d 09 2d 2d |al_argum|ent;..--|
|00000630| 0c 53 43 41 4e 5f 43 4f | 4d 2e 41 44 41 4f 02 00 |.SCAN_CO|M.ADAO..|
|00000640| 00 00 54 45 58 54 3f 3f | 3f 3f 01 00 00 00 01 40 |..TEXT??|??.....@|
|00000650| 00 00 54 45 58 54 3f 3f | 3f 3f 01 00 00 00 01 40 |..TEXT??|??.....@|
|00000660| ff fe 00 84 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 9e 67 95 cb 00 00 | 05 1a 00 00 01 7e 6c 5f |...g....|.....~l_|
|00000680| 61 72 67 75 6d 65 6e 74 | 20 3d 3e 0d 20 20 20 20 |argument| =>. |
|00000690| 70 75 74 5f 6c 69 6e 65 | 28 22 49 6c 6c 65 67 61 |put_line|("Illega|
|000006a0| 6c 20 61 72 67 75 6d 65 | 6e 74 22 29 3b 0d 0d 20 |l argume|nt");.. |
|000006b0| 20 77 68 65 6e 20 75 6e | 72 65 63 6f 67 6e 69 7a | when un|recogniz|
|000006c0| 65 64 5f 6f 70 74 69 6f | 6e 20 3d 3e 0d 20 20 20 |ed_optio|n =>. |
|000006d0| 20 70 75 74 5f 6c 69 6e | 65 28 22 55 6e 72 65 63 | put_lin|e("Unrec|
|000006e0| 6f 67 6e 69 7a 65 64 20 | 6f 70 74 69 6f 6e 3a 20 |ognized |option: |
|000006f0| 27 22 20 26 0d 09 09 76 | 61 6c 75 65 28 74 68 69 |'" &...v|alue(thi|
|00000700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 6c 6f 73 |...H..Mo|naco.los|
|00000710| 65 00 2d 79 00 50 72 6f | 38 30 3a 70 61 63 3a 61 |e.-y.Pro|80:pac:a|
|00000720| 64 61 75 74 69 6c 00 06 | 00 04 00 3c 00 24 01 dd |dautil..|...<.$..|
|00000730| 02 7d 00 3c 00 24 01 dd | 02 7d 9e 67 95 d0 00 00 |.}.<.$..|.}.g....|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00000750| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 02 f1 00 |...L...L|...2....|
|00000760| 03 ae 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00000770| 00 0a 03 ed ff ff 00 00 | 00 00 00 04 29 80 00 00 |........|....)...|
+--------+-------------------------+-------------------------+--------+--------+